import{ut as e}from"./B603vO-13smUKN.js";import{it as t}from"./CIxmKYxc4tZcJF.js";var n=e(`singleton`);function r(e){let r=globalThis;return r.__ouiSingletons=r.__ouiSingletons??{},r.__ouiSingletons[e]===!0?(n.warn(`Singleton ${e} can only be instantiated once!`),!1):(r.__ouiSingletons[e]=!0,t(()=>r.__ouiSingletons[e]=!1),!0)}function i(e,t){let n=globalThis;n.__ouiSingletonObjects=n.__ouiSingletonObjects??{};let r=n.__ouiSingletonObjects[e];return r??(r=t(),n.__ouiSingletonObjects[e]=t()),r}export{r as n,i as t};